/** 数据仓库主模块 */
import {
  legacy_createStore,
  combineReducers,
  applyMiddleware   // 中间件应用模块
} from "redux"

import thunk from "redux-thunk"

import goodsReducer from "./goods/goodsReducer"

// store添加redux-thunk中间件支持，让creator可以返回函数(函数内发送异步请求)
const store = legacy_createStore(combineReducers({
  goods: goodsReducer
}), applyMiddleware(thunk))

export default store
